import datetime
from applications.extensions import db

class Page(db.Model):
    __tablename__ = 'zbook_page'
    id = db.Column(db.Integer, primary_key=True)
    book_id = db.Column(db.Integer, comment='book id')
    title = db.Column(db.String(512))
    img = db.Column(db.String(255))
    content = db.Column(db.Text)
    sort = db.Column(db.Integer, comment='排序')
    status = db.Column(db.Integer)
    uid = db.Column(db.Integer)
    changed = db.Column(db.Integer, default=0, comment='修改数')
    update_time = db.Column(db.DateTime, default=datetime.datetime.now)

